import request from '/@/utils/request';

const workable_api = import.meta.env.VITE_WORKABLE_API as string;

/**
 * 获取节点信息管理列表
 * @param params 
 */
export function getWorkableNodeList(params?: object){
    return request({
        url: workable_api + '/node/list',
        method: 'get',
        params: params
    })
}

/**
 * 获取节点信息
 * @param params 
 */
export function getWorkableNode(params?: object){
    return request({
        url: workable_api + '/node/info',
        method: 'get',
        params: params
    })
}

/** 新增节点信息 */
export function addWorkableNode(params? : object){
    return request({
        url: workable_api + '/node/add',
        method: 'post',
        data: params
    });
}

/** 修改节点信息 */
export function editWorkableNode(params?: object) {
    return request({
        url: workable_api + '/node/edit',
        method: 'post',
        data: params
    });
}

/** 删除节点信息 */
export function delWorkableNode(params?: object){
    return request({
        url: workable_api + '/node/remove',
        method: 'post',
        data: params
    });
}
